package com.lianbang.staff.adapter

import cn.ubest.mvvmcore.utils.TimeUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.lianbang.staff.R
import com.lianbang.staff.bean.ShopOrderListBean

/**
 * Created by maoqi on 2020/12/28.
 */
class ShopDetailListAdapter :
    BaseQuickAdapter<ShopOrderListBean, BaseViewHolder>(R.layout.item_shop_detail_list) {
    override fun convert(helper: BaseViewHolder, item: ShopOrderListBean) {
        helper.setText(R.id.tv_date, TimeUtils.formatTime(item.add_time * 1000, "yyyy/MM/dd"))
            .setText(R.id.tv_category_number, "${item.cart_num}")
            .setText(R.id.tv_number, "${item.total_num}")
            .setText(R.id.tv_total_money, "${item.pay_price}")
    }

}